package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;

import java.util.Date;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;

public class ServerMail extends DataObject {

	private int mailId;

	private int mailType;

	private String title;

	private String content;

	private String annexes;

	private Date sendTime;

	private boolean isDelete;

	//新后台群发邮件ID
	private long massId;

	private Set<String> appIdSet = new HashSet<>();

	public int getMailId() {
		return mailId;
	}

	public void setMailId(int mailId) {
		if(this.mailId != mailId) {
			this.mailId = mailId;
			setUpdateOption();
		}
	}

	public int getMailType() {
		return mailType;
	}

	public void setMailType(int mailType) {
		if(this.mailType != mailType) {
			this.mailType = mailType;
			setUpdateOption();
		}
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		if(!Objects.equals(this.title, title)) {
			this.title = title;
			setUpdateOption();
		}
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		if(!Objects.equals(this.content, content)) {
			this.content = content;
			setUpdateOption();
		}
	}

	public String getAnnexes() {
		return annexes;
	}

	public void setAnnexes(String annexes) {
		if(!Objects.equals(this.annexes, annexes)) {
			this.annexes = annexes;
			setUpdateOption();
		}
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		if(this.sendTime != sendTime) {
			this.sendTime = sendTime;
			setUpdateOption();
		}
	}

	public boolean isDelete() {
		return isDelete;
	}

	public void setDelete(boolean delete) {
		if(this.isDelete != delete) {
			isDelete = delete;
			setUpdateOption();
		}
	}

	public Set<String> getAppIdSet() {
		return appIdSet;
	}

	public void setAppIdSet(Set<String> appIdSet) {
		if (!Objects.equals(this.appIdSet, appIdSet)) {
			this.appIdSet = appIdSet;
			setUpdateOption();
		}
	}

	public long getMassId() {
		return massId;
	}

	public void setMassId(long massId) {
		if(this.massId != massId) {
			this.massId = massId;
			setUpdateOption();
		}
	}
}
